﻿using System;
using System.Windows.Forms;

namespace SampleApp
{
	static class Program
	{
		[STAThread]
		static void Main()
		{
			Application.EnableVisualStyles();
			Application.SetCompatibleTextRenderingDefault(false);

			ScanDialog scanDialog = new ScanDialog
			{
				Resolution = 300,
				DocumentSizeName = "A4",
				InstantScan = true,
			};

			if (scanDialog.ShowDialog()==DialogResult.OK)
			{
				scanDialog.FrontImage.Save("front.png");
				if (scanDialog.BackImage!=null)
					scanDialog.BackImage.Save("back.png");
			}
		}
	}
}
